﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:o="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
    xmlns:l="http://wpflocalizeextension.codeplex.com"
    xmlns:local="clr-namespace:Imagin.Controls.Extended"
    xmlns:Controls.Common="clr-namespace:Imagin.Controls.Common;assembly=Imagin.Controls.Common">
    <Style x:Key="{x:Type local:ChipBase}" TargetType="{x:Type local:ChipBase}">
        <Setter Property="BorderBrush" Value="Black"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Height" Value="30"/>
        <Setter Property="MinHeight" Value="15"/>
        <Setter Property="MinWidth" Value="15"/>
        <Setter Property="Width" Value="30"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:ChipBase}">
                    <Border 
                        BorderBrush="{TemplateBinding BorderBrush}" 
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <Controls.Common:CheckerBoard 
                            BorderBrush="White" 
                            BorderThickness="1"
                            CheckerForeground="LightGray">
                            <Rectangle Fill="{Binding Value, RelativeSource={RelativeSource AncestorType={x:Type local:ChipBase}}}"/>
                        </Controls.Common:CheckerBoard>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>